package appli.launcher;

import appli.agentImpl.Directory;
import system.DebugOptionInterface;
import system.util.Loader;

/**
 * Start a new Directory agent
 */
public class LauncherDirectory implements DebugOptionInterface {

	/**
	 * @param args {agentName, host, port}
	 */
	public static void main(String[] args) {
		try {
			// chargement du code de l'agent
			Loader l = new Loader(Directory.class.getName());
			Class c = l.loadClass(Directory.class.getName(), true);
			Directory d = (Directory)c.newInstance();
			if (OPTION) { 
				System.out.println("Annuaire démarré sur : " + d.getCurrentHost() + ":" + d.getCurrentPort());
			}
			d.main();
		} catch (Exception ex) {
			ex.printStackTrace();
		}
	}

}
